<template>
	<view class="bg-box" :class="'bg-box-'+info.mode">
		<view class="text-model" style="width:100%;">
			<view v-if="info.mode==1" class="icon-box">
				<image v-if="info.icon=='error'" :src="$imgSrc('static/images/icon-error.png')" class="icon-cls">
				</image>
				<image v-else class="icon-cls" :src="$imgSrc('static/images/icon-success.png')"></image>
			</view>
			<view v-if="info.title" class="title-text">{{info.title}}</view>
			<view v-if="info.content" class="content-text">
				<block v-if="info.is_html">
					<view v-html="info.content"></view>
				</block>
				<block v-else>
					{{info.content}}
				</block>
			</view>
		</view>
		<view v-if="info.mode==2" class="pr-48 pl-48">
			<view style="height:120upx;"></view>
			<view class="mt-24 tcenter bold">
				缴纳技术服务费
			</view>
			<view class="col777 fz28 mt-32" style="line-height:48upx;">
				缴纳技术服务费，缴纳之后，根据订单次数收费，根据车型不统收费不同
			</view>
			<view>收费标准如图所示</view>
			<view class="list-box">
				<view v-for="(item,index) in 4" class="bb row-box">
					<view class="ltext">低于6.8米</view>
					<view class="rtext">
						<view class="rcont">50元/次</view>
					</view>
				</view>
			</view>

		</view>
		<view class="mt-32 bnt-box">
			<block v-if="info.bnt.length>1">
				<view class="bcls lbnt" @click="func" type="primary">{{info.bnt[0]}}</view>
				<view class="bcls" @click="close" type="primary">{{info.bnt[0]}}</view>
			</block>
			<block v-else>
				<view v-if="info.is_com"  class="bcls com" @click="func" type="primary">{{info.bnt[0]}}</view>
				<view v-else  class="bcls com" @click="close" type="primary">{{info.bnt[0]}}</view>
			</block>
		</view>
		<view v-if="info.mode==3" class="phone-box">
			<image src="../../static/dui.png" class="img-cls"></image>
		</view>
		<view v-if="info.mode==2||info.mode==4" class="phone-box">
			<image src="../../static/jsfw.png" class="img-cls"></image>
		</view>
		<view class="close_bnt" v-if="info.colse_icon!=undefined">
			<image @click="close" src="../../static/close.png" class="cimg-cls"></image>
		</view>
	</view>



</template>

<script>
	export default {
		name: "my-model",
		props: {
			info: {
				type: Object,
				default: () => {
					return {
						icon: "error",
						title: "审核失败",
						content: "失败原因失败原因失败原因",
						bnt: ["联系客服", "我知道了"],
						mode: 1
					}
				}
			}

		},

		data() {
			return {

			};
		},
		methods: {
			close() {
				this.$emit('close')
			},
			func() {
				this.$emit('com')

			}
		}
	}
</script>

<style scoped lang="scss">
	.bg-box {
		overflow: hidden;
		width: 100%;
	}

	.text-model {
		width: 100%;
		background: linear-gradient(180deg, #C2E6FE 0%, rgba(255, 255, 255, 0) 100%);
		border-radius: 16upx;
		overflow: hidden;
	}

	.bnt-box {
		text-align: center;
		overflow: hidden;
		height: 104upx;
		width: 100%;

		.lbnt {
			background: #fff;
			color: #0195FD;
			border: 2upx solid #0195FD;
			font-size: 32upx;
			margin-right: 24upx;
		}
	}

	.bcls {
		width: 204upx;
		display: inline-block;
		border-radius: 88upx;
		height: 80upx;
		line-height: 80upx;
		color: #fff;
	}


	.title-text {
		margin-top: 80upx;
		color: #5A5A5A;
		text-align: center;
		font-size: 28upx;
		font-weight: 600;
		height: 44upx;
		line-height: 44upx;
	}

	.content-text {
		width: 100%;
		font-size: 24upx;
		color: #999999;
		line-height: 44upx;
		text-align: center;
		padding: 0 44upx;
		overflow: hidden;
	}

	.icon-box {
		text-align: center;
		padding-top: 68upx;

		.icon-cls {
			display: inline-block;
			width: 144upx;
			height: 168upx;
		}
	}

	.com {
		background: linear-gradient(29deg, #02A8FE 0%, #0085FC 100%) !important;
		border-radius: 88upx;
		width: 360upx;
	}

	.bg-box-2,
	.bg-box-4 {
		.text-model {
			background: #fff;
		}

		.phone-box {
			width: 100%;
			height: 204upx;
			position: absolute;
			top: -112upx;
			text-align: center;

			.img-cls {
				width: 225upx !important;
				height: 240upx !important;
			}
		}
	}

	.bg-box-3,
	.bg-box-2,
	.bg-box-4 {
		.bcls {
			border-radius: 16upx !important;
		}

		.title-text {
			font-size: 40upx;
			margin-bottom: 60upx;
			margin-top: 180upx;
		}

		.com {
			width: 542upx;
		}

		.bnt-box {
			margin-bottom: 24upx;
		}

		.phone-box {
			width: 100%;
			height: 204upx;
			position: absolute;
			top: -112upx;
			text-align: center;

			.img-cls {
				width: 278upx;
				height: 224upx;
			}
		}
	}

	.close_bnt {
		width: 100%;
		height: 100upx;
		padding-top: 40upx;
		position: absolute;
		text-align: center;

		.cimg-cls {
			width: 72upx;
			height: 72upx;
			display: inline-block;
		}
	}

	.bb {
		border-bottom: 1upx solid #CCCCCC;
	}

	.list-box {
		font-size: 24upx;
		margin-top: 24upx;
		overflow: hidden;
		border-left: 1upx solid #CCCCCC;
		border-right: 1upx solid #CCCCCC;
		border-top: 1upx solid #CCCCCC;
	}

	.row-box {
		overflow: hidden;
	}

	.ltext {
		width: 30%;
		float: left;
		text-align: center;
		background: #F6F6F6;
		padding: 24upx 0;
	}

	.rtext {
		width: 70%;
		float: right;
		text-align: left;

		.rcont {
			padding: 24upx 32upx;
			border-left: 1upx solid #CCCCCC;
		}
	}
</style>